package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.annotation.FieldDescription;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author LiSiPing
 * @since 2025-02-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Plaza implements Serializable {

    private static final long serialVersionUID = 1L;

    @FieldDescription(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @FieldDescription(value = "用户编号")
    private Long userId;

    @FieldDescription(value = "发布内容")
    private String content;

    @FieldDescription(value = "发布图片")
    private String plazaImg;

    @FieldDescription(value = "热度,置顶一次 加 1w热度")
    private Integer heat;

    @FieldDescription(value = "1待审核,2审核通过,3审核不通过,4异常")
    private Integer status;

    @FieldDescription(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    //置顶时间
    private Date topTime;

    //是否自动置顶 1不需要自动置顶,2自动置顶
    private Integer automaticTop;

    @FieldDescription(value = "创建人")
    private String createBy;

    @FieldDescription(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @FieldDescription(value = "修改人")
    private String updateBy;

    @FieldDescription(value = "逻辑删除")
    private Boolean deleteFlag;

    @TableField(exist = false)
    private SysUser sysUser;

    //页码
    @TableField(exist = false)
    public Long current;

    //行数
    @TableField(exist = false)
    private Long size;

}
